package com.gonsin.gview.annotations.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

@Data
@ApiModel("触发按钮的请求")
public class ViewRequest {

    @ApiModelProperty("页面唯一标识")
    private String viewName;

    @ApiModelProperty("请求")
    private HttpServletRequest request;

    @ApiModelProperty("页面唯一标识")
    private HttpServletResponse response;

    @ApiModelProperty("请求的内容")
    private Map<String, Object> props;

    @ApiModelProperty(hidden = true, value = "是否正在初始化")
    private boolean initialing;

    public ViewRequest(HttpServletRequest request, HttpServletResponse response, Map<String, Object> props) {
        this.request = request;
        this.response = response;
        this.props = props;
        this.initialing = false;
    }

    public ViewRequest(){}
}
